//
//  Utils.h
//  JuYouQian
//
//  Created by hisuntech on 14-12-18.
//  Copyright (c) 2014年 hisuntech. All rights reserved.
//

#import <UIKit/UIKit.h>

enum IPHONE_MODEL{
    NONE,
    iPHONE4,
    iPHONE5,
    iPHONE6,
    iPHONE6_PLUS,
    iPAD_OTHER
};


@interface Utils : NSObject

+(int)getIphoneModel;
    
+(UIImage*)screenshot:(UIView*)viewshot ;
+(UIImage*)ScreenShots;


+(Boolean)hasNetwork;

+(NSString*)getDataDay:(NSString*)dateStr;
+(NSString*)getFormatDateTime:(NSString*)dateStr;
+(NSString*)getFormatDate:(NSString*)date;
+(NSString*)getFormatDateH:(NSString*)dateStr;

+(NSString*)getFormatCurrDate;

+(void)clearLoginCookie;
+(void)saveLoginCookies;

+(void)setViewBorder:(UIView*)view radius:(CGFloat)radius borderColor:(UIColor*)borderColor;
+(void)setViewBorder:(UIView*)view radius:(CGFloat)radius borderColor:(UIColor*)borderColor borderW:(float)width;

//ios 判断字符串为空和只为空格解决办法
+(NSString*)isBlankString:(NSString *)string;
//判断字符串中是否有中文
+(BOOL)containsChinese:(NSString *)str;

//与业务有关系
+(NSString*)getLimitTypeData:(NSString*)limitType data:(NSString*)limiteData;
+(NSString*)getProVendorName:(NSString*)vendorCode;
+(NSString*)getOrderStatus:(NSString*)strOrderStatus;
+(UIColor*)getOrederStatusColor:(NSString*)strOrderStatus;
    
// MD5字符串加密
+(NSString *)MD5:(NSString *)str;
//抖动动画
+(void)shakeAnimationForView:(UIView *) view;
// 正则判断手机号码地址格式
+(NSString *)phoneNumberFormart:(NSString *)phoneNumber;
// 正则判断手机号码地址格式
+(BOOL)isMobileNumber:(NSString *)mobileNum;
//判断身份证正确与否
+(NSString *)CheckIDNoForCreaditCard:(NSString*) idNo;
//判断邮箱格式是否正确
+(BOOL)ValidateEmail:(NSString *)email;
//用户名
+ (BOOL)ValidateUserName:(NSString *)name;
//密码
+ (BOOL)ValidatePassword:(NSString *)passWord;
//判断是否包含
+ (BOOL)judgeRange:(NSArray*) _termArray Password:(NSString*) _password;
//密码强度判断
//返回：intResult <2 "密码强度低，建议修改"
//intResult＝2 "密码强度一般"
//intResult>2 "密码强度高"
+(int)judgePasswordStrength:(NSString*) _password;
+ (NSString *)md5:(NSString *)str;
+ (NSString *)SHA1:(NSString *)str;
@end
